home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Add-Ons / AppleScript / Stufffolder 1.0 / Sources / Stufffolder OSAX / optionKey.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-15  |  802 b   |  40 lines  |  [TEXT/KAHL]

  1. //
  2. //    frontProcess osax
  3. //
  4. #include <Aliases.h>
  5. #include <Memory.h>
  6. #include <Fonts.h>
  7. #include <OSEvents.h>
  8. #include <limits.h> 
  9. #include <Menus.h>
  10. #include <Processes.h>
  11. #include <String.h>
  12. #include <Resources.h>
  13. #include <Packages.h>
  14. #include <AppleEvents.h>
  15. #include <Errors.h>
  16. #include <GestaltEqu.h>
  17. #include <Files.h>
  18. #include <Script.h>
  19.  
  20. #include "Stufffolder osax.h"
  21.  
  22. pascal OSErr main( AppleEvent *theEvent, AppleEvent *theReply, long theRefCon)
  23. {
  24.     #pragma unused( theEvent, theRefCon);
  25.  
  26.     OSErr theErr = noErr;
  27.  
  28.     EventRecord theEventRecord;
  29.  
  30.     Boolean optionDown;
  31.  
  32.     (void)EventAvail( everyEvent, &theEventRecord);
  33.  
  34.     optionDown = ((theEventRecord.modifiers & optionKey) != 0);
  35.  
  36.     theErr = AEPutParamPtr( theReply, keyDirectObject, typeBoolean, &optionDown, sizeof( Boolean));
  37.  
  38.     return theErr;
  39. }
  40.